<template>
    <li>
        <input type="checkbox" :checked="todo.done" @change="checkItem(todo)">
        <span>{{todo.text}}</span>
        <span>{{todo.done}}</span>
        <button @click="removeTodo(todo)">删除</button>
    </li>
</template>
<script>
import {mapActions} from 'vuex'
export default {
    props:['todo'],
    methods:{
        ...mapActions(['removeTodo','checkItem'])
    }
}
</script>
